package demo;

/**
 * Created with IntelliJ IEDA.
 * Description:
 * User:86186
 * Date:2022-05-13
 * Time:0:14
 */
/*
class Student{
    */
/*
    *   new里面有成员变量和成员方法
     *//*

    //普通成员变量
    public String name;
    public double score;
    public int age;
    //静态成员变量：不属于对象
    public static String classes = "一班";//班级

    public Student(String name, double score, int age) {
        this.name = name;
        this.score = score;
        this.age = age;
    }
    public void goClass(){
        System.out.println(name+"上课！");
        classes = "二班";
    }
    public void test(){

    }
    public static void staticFunc( ){//静态//在（）中给一个参数



        */
/*//*
/name = "bababab";
        System.out.println("这是一个静态的成员方法!->类方法");
        //1.先有对象
        //Student student = new Student("wenwen",59.9,18);
        //2.通过对象来访问
        //student.name = "awen";
        //student.name="awen";*//*


    }

}

public class Test {
    public static void main(String[] args) {
        System.out.println(Student.classes);
        Student.staticFunc();
    }

    public static void main1(String[] args) {
        Student student1 = new Student("wenwen",59.9,18);
        System.out.println(Student.classes);
        Student student2 = new Student("wenhua",99,28);
        System.out.println(Student.classes);
        //他们都是一班的

    }
}
*/
